package com.example.homework07.bean;

import com.example.homework07.R;

import java.util.ArrayList;

public class GoodsInfo {
    public long rowid; // 行号
    public int sn; // 序号
    public String name; // 名称
    public String desc; // 描述
    public float price; // 价格
    public String thumb_path; // 小图的保存路径
    public String pic_path; // 大图的保存路径
    public int thumb; // 小图的资源编号
    public int pic; // 大图的资源编号

    public GoodsInfo() {
        rowid = 0L;
        sn = 0;
        name = "";
        desc = "";
        price = 0;
        thumb_path = "";
        pic_path = "";
        thumb = 0;
        pic = 0;
    }

    // 声明一个手机商品的名称数组
    private static String[] mNameArray = {
            "Apple iphone 12", "Apple iphone 12 Pro", "Apple iphone 12 Pro Max", "Apple iphone 12 Pro mini",
            "HUAWEI Mate40 Pro", "HUAWEI Mate 40 Pro+", "HUAWEI P40","HUAWEI P40 Pro","HUAWEI P40 Pro+","HUAWEI nova 7 Pro"
    };
    // 声明一个手机商品的描述数组
    private static String[] mDescArray = {
            "Apple iPhone 12 (A2404) 64GB 蓝色 支持移动联通电信5G 双卡双待手机",
            "Apple iPhone 12 Pro (A2408) 128GB 海蓝色 支持移动联通电信5G 双卡双待手机",
            "Apple iphone 12 Pro Max (A2412) 128GB 金色 支持移动联通电信5G 双卡双待手机",
            "Apple iphone 12 Pro mini (A2400) 64GB 绿色 支持移动联通电信5G",
            "华为 HUAWEI Mate 40 Pro 麒麟9000 SoC芯片 超感知徕卡电影影像 ",
            "华为 HUAWEI Mate 40 Pro+麒麟9000 SoC芯片 超感知徕卡电影五摄 纳米微晶 ",
            "华为 HUAWEI P40 麒麟990 5G SoC芯片 5000万超感知徕卡三摄 30倍数字变焦 ",
            "华为 HUAWEI P40 Pro 麒麟990 5G SoC芯片 5000万超感知徕卡四摄 50倍数字变焦 ",
            "华为 HUAWEI P40 Pro+ 麒麟990 5G SoC芯片 5000万超感知徕卡五摄 100倍双目变焦 ",
            "华为 HUAWEI nova 7 Pro 3200万追焦双摄 50倍潜望式变焦四摄 5G SOC芯片 ",

    };
    // 声明一个手机商品的价格数组
    private static float[] mPriceArray = {6299, 8499, 9299, 5499, 6999, 8999,4478,6478,7958,3699};
    // 声明一个手机商品的小图数组
    private static int[] mThumbArray = {
            R.drawable.iphone12_s,R.drawable.iphone12pro_s,R.drawable.iphone12promax_s,R.drawable.iphone12promini_s,R.drawable.huaweimate40pro_s,
            R.drawable.huaweimate40pro2_s,R.drawable.huaweip40_s,R.drawable.huaweip40pro_s,R.drawable.huaweip40pro2_s,
            R.drawable.huaweinova7pro_s
    };
    // 声明一个手机商品的大图数组
    private static int[] mPicArray = {
            R.drawable.iphone12,R.drawable.iphone12pro,R.drawable.iphone12promax,R.drawable.iphone12promini,R.drawable.huaweimate40pro,
            R.drawable.huaweimate40pro2,R.drawable.huaweip40,R.drawable.huaweip40pro,R.drawable.huaweip40pro2,
            R.drawable.huaweinova7pro

    };

    // 获取默认的手机信息列表
    public static ArrayList<GoodsInfo> getDefaultList() {
        ArrayList<GoodsInfo> goodsList = new ArrayList<GoodsInfo>();
        for (int i = 0; i < mNameArray.length; i++) {
            GoodsInfo info = new GoodsInfo();
            info.name = mNameArray[i];
            info.desc = mDescArray[i];
            info.price = mPriceArray[i];
            info.thumb = mThumbArray[i];
            info.pic = mPicArray[i];
            goodsList.add(info);
        }
        return goodsList;
    }
}
